#include <stdio.h>
#include <unistd.h>

int main() 
{
    int count = 1;
    while(1)
    {
        printf("[");
        for (int i = 0; i < count; i++) 
            printf("=");
        for (int i = 0; i <100 - count; i++) 
            printf(" ");
        printf("]%d", count);
        printf("\r");
        count++;
        if (count == 101)
            break;
        fflush(stdout); // 刷新输出缓冲区，确保进度条立即显示
        usleep(50000); // 模拟耗时操作
    }
    printf("\n");
    return 0;
}